using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialStatisticsTools._ModelingSpatialRelationships
{
    /// <summary>
    /// <para>Ordinary Least Squares </para>
    /// <para>Performs global Ordinary Least Squares (OLS) linear regression to generate predictions or to model a dependent variable in terms of its relationships to a set of explanatory variables.</para>
    /// <para>执行全局普通最小二乘法 （OLS） 线性回归，以生成预测或根据因变量与一组解释变量的关系对因变量进行建模。</para>
    /// </summary>    
    [DisplayName("Ordinary Least Squares ")]
    public class OrdinaryLeastSquares : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public OrdinaryLeastSquares()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_Feature_Class">
        /// <para>Input Feature Class</para>
        /// <para>The feature class containing the dependent and independent variables for analysis.</para>
        /// <para>包含用于分析的因变量和自变量的要素类。</para>
        /// </param>
        /// <param name="_Unique_ID_Field">
        /// <para>Unique ID Field</para>
        /// <para>An integer field containing a different value for every feature in the Input Feature Class.</para>
        /// <para>一个整数字段，其中包含输入要素类中每个要素的不同值。</para>
        /// </param>
        /// <param name="_Output_Feature_Class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will receive dependent variable estimates and residuals.</para>
        /// <para>将接收因变量估计值和残差的输出要素类。</para>
        /// </param>
        /// <param name="_Dependent_Variable">
        /// <para>Dependent Variable</para>
        /// <para>The numeric field containing values for what you are trying to model.</para>
        /// <para>包含您尝试建模的内容的值的数值字段。</para>
        /// </param>
        /// <param name="_Explanatory_Variables">
        /// <para>Explanatory Variables</para>
        /// <para>A list of fields representing explanatory variables in your regression model.</para>
        /// <para>表示回归模型中解释变量的字段列表。</para>
        /// </param>
        public OrdinaryLeastSquares(object _Input_Feature_Class, object _Unique_ID_Field, object _Output_Feature_Class, object _Dependent_Variable, List<object> _Explanatory_Variables)
        {
            this._Input_Feature_Class = _Input_Feature_Class;
            this._Unique_ID_Field = _Unique_ID_Field;
            this._Output_Feature_Class = _Output_Feature_Class;
            this._Dependent_Variable = _Dependent_Variable;
            this._Explanatory_Variables = _Explanatory_Variables;
        }
        public override string ToolboxName => "Spatial Statistics Tools";

        public override string ToolName => "Ordinary Least Squares ";

        public override string CallName => "stats.OrdinaryLeastSquares";

        public override List<string> AcceptEnvironments => ["MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_Input_Feature_Class, _Unique_ID_Field, _Output_Feature_Class, _Dependent_Variable, _Explanatory_Variables, _Coefficient_Output_Table, _Diagnostic_Output_Table, _Output_Report_File];

        /// <summary>
        /// <para>Input Feature Class</para>
        /// <para>The feature class containing the dependent and independent variables for analysis.</para>
        /// <para>包含用于分析的因变量和自变量的要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_Feature_Class { get; set; }


        /// <summary>
        /// <para>Unique ID Field</para>
        /// <para>An integer field containing a different value for every feature in the Input Feature Class.</para>
        /// <para>一个整数字段，其中包含输入要素类中每个要素的不同值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Unique ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Unique_ID_Field { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class that will receive dependent variable estimates and residuals.</para>
        /// <para>将接收因变量估计值和残差的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Output_Feature_Class { get; set; }


        /// <summary>
        /// <para>Dependent Variable</para>
        /// <para>The numeric field containing values for what you are trying to model.</para>
        /// <para>包含您尝试建模的内容的值的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dependent Variable")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Dependent_Variable { get; set; }


        /// <summary>
        /// <para>Explanatory Variables</para>
        /// <para>A list of fields representing explanatory variables in your regression model.</para>
        /// <para>表示回归模型中解释变量的字段列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Explanatory Variables")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Explanatory_Variables { get; set; }


        /// <summary>
        /// <para>Coefficient Output Table</para>
        /// <para>The full path to an optional table that will receive model coefficients, standardized coefficients, standard errors, and probabilities for each explanatory variable.</para>
        /// <para>可选表的完整路径，该表将接收每个解释变量的模型系数、标准化系数、标准误差和概率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coefficient Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Coefficient_Output_Table { get; set; } = null;


        /// <summary>
        /// <para>Diagnostic Output Table</para>
        /// <para>The full path to an optional table that will receive model summary diagnostics.</para>
        /// <para>将接收模型摘要诊断的可选表的完整路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Diagnostic Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Diagnostic_Output_Table { get; set; } = null;


        /// <summary>
        /// <para>Output Report File</para>
        /// <para>The path to the optional PDF file the tool will create. This report file includes model diagnostics, graphs, and notes to help you interpret the OLS results.</para>
        /// <para>该工具将创建的可选 PDF 文件的路径。此报告文件包括模型诊断、图形和注释，可帮助您解释 OLS 结果。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Report File")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Output_Report_File { get; set; } = null;


        public OrdinaryLeastSquares SetEnv(object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}